<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" >

	<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
	<link href="https://fonts.googleapis.com/css?family=Roboto+Mono" rel="stylesheet">
	<link href="https://fonts.googleapis.com/css?family=Cousine|Inconsolata" rel="stylesheet">
	<link rel="shortcut icon" type="image/png" href="/favicon.png">

	
	<link rel="stylesheet" href="/css/style.css">
	<link rel="stylesheet" href="/css/css/fontawesome-all.min.css">
	<script src="/js/main.js"></script>
	

	<!-- Begin Jekyll SEO tag v2.1.0 -->
<title>Broadcast Ops Comment - Steem Developer</title>
<meta property="og:title" content="Broadcast Ops Comment" />
<meta name="description" content="This is a brief overview of the parameters allowed and values passed by the ‘comment’ operation Additional info for API definitions is available on the dev portal Purpose: A broadcast operation on Steem is a way of expressing intention on the blockchain. They have types, like comment in this instance, and they parameters (like author) depending on what their intended use is In other words, the broadcast.comment operation creates a post or a comment on a current post, on the steem blockchain. Rules: The “title” must not be longer than 256 bytes The “title” must be UTF-8 The “body” must be larger than 0 bytes The “body” much also be UTF-8 Parameters: parent_author - the author that comment is being submitted to, when posting a new blog this is an empty string parent_permlink - specific post that comment is being submitted to, when posting a new blog this is an empty string author - author of the post/comment being submitted (account name) permlink - unique string identifier for the post, linked to the author of the post title - human readable title of the post being submitted, this is often blank when commenting body - body of the post/comment being submitted, or diff-match-patch when updating json_metadata - JSON object string Additional Parameter Definitions: permlink: Two authors may have the same permlink as it’s unique to the author only. For example, there could be two authors, alice and bob, and both could have a permlink of firstpost json_metadata: There is no blockchain enforced validation on json_metadata, but the community has adopted a particular structure. It should contain a JSON object with the following keys: tags - An array of up to 5 strings. Although the blockchain will accept more than 5, the tags plugin only looks at the first five app - A user agent style application identifier. Typically app_name.version, e.g. steemit/0.1 format - The format of the body, e.g. markdown In addition to the above keys, application developrs are free to add any other keys they want to help manage the content they broadcast. A typical comment operation would look similar to the below: const post = { author :&quot;Joe&quot;, title :&quot;A post by Joe&quot;, body :&quot;Look at my awesome post&quot;, parent_author :&#39;&#39;, parent_permlink :&quot;steem&quot;, permlink :&quot;a-post-by-joe&quot;, json_metadata :&quot;{\&quot;tags\&quot;:[\&quot;steemit\&quot;,\&quot;example\&quot;,\&quot;tags\&quot;]}&quot;, }; In which case the complete broadcast operation would look like this: broadcast.comment(post, privatePostingKey) With privatePostingKey being the private posting key of the author broadcasting the comment or post Create_vs_Update: When a comment is first broadcast, the permlink must be unique for the author. Otherwise, it is interpreted as an update operation. Updating will either replace the entire body with the latest operation or patch the body if using diff-match-patch. For example, if we have a paragraph that has already been broadcast: “It’s been quite a lot of fun working with these wonderful folk at Steemit, Inc” And we want to change it to: “It’s been quite a lot of fun working with these wonderful people at Steemit, Inc” We can broadcast the comment operation with the following body: ”@@ -406,12 +406,14 @@” ful -folk +people at The blockchain will know that this means we have changed the word ‘folk’ to ‘people’ within that paragraph so when fetching this content, this diff will be applied. In addition to body, the title and json_metadata fields will also be replaced by the latest operation. Comment_Options: LINK Updating_Archived_Content: Content that is older than 7 days is considered “archived” and cannot be edited unless the author indicates otherwise by broadcasting a custom_json to the witness plugin using their active authority. As of HF18, the witness plugin has a custom operation called enable_content_editing that allows a user to signal they want to edit their content. By consensus, content is editable indefinitely, but is soft forked to be frozen after payout. This operation requires an active key and is designed to prevent vandalism if a posting key is compromised. For ‘custom_json’: LINK Vote: LINK It should also be noted that a vote operation can accompany a comment in the same transaction when the author self_upvotes" />
<meta property="og:description" content="This is a brief overview of the parameters allowed and values passed by the ‘comment’ operation Additional info for API definitions is available on the dev portal Purpose: A broadcast operation on Steem is a way of expressing intention on the blockchain. They have types, like comment in this instance, and they parameters (like author) depending on what their intended use is In other words, the broadcast.comment operation creates a post or a comment on a current post, on the steem blockchain. Rules: The “title” must not be longer than 256 bytes The “title” must be UTF-8 The “body” must be larger than 0 bytes The “body” much also be UTF-8 Parameters: parent_author - the author that comment is being submitted to, when posting a new blog this is an empty string parent_permlink - specific post that comment is being submitted to, when posting a new blog this is an empty string author - author of the post/comment being submitted (account name) permlink - unique string identifier for the post, linked to the author of the post title - human readable title of the post being submitted, this is often blank when commenting body - body of the post/comment being submitted, or diff-match-patch when updating json_metadata - JSON object string Additional Parameter Definitions: permlink: Two authors may have the same permlink as it’s unique to the author only. For example, there could be two authors, alice and bob, and both could have a permlink of firstpost json_metadata: There is no blockchain enforced validation on json_metadata, but the community has adopted a particular structure. It should contain a JSON object with the following keys: tags - An array of up to 5 strings. Although the blockchain will accept more than 5, the tags plugin only looks at the first five app - A user agent style application identifier. Typically app_name.version, e.g. steemit/0.1 format - The format of the body, e.g. markdown In addition to the above keys, application developrs are free to add any other keys they want to help manage the content they broadcast. A typical comment operation would look similar to the below: const post = { author :&quot;Joe&quot;, title :&quot;A post by Joe&quot;, body :&quot;Look at my awesome post&quot;, parent_author :&#39;&#39;, parent_permlink :&quot;steem&quot;, permlink :&quot;a-post-by-joe&quot;, json_metadata :&quot;{\&quot;tags\&quot;:[\&quot;steemit\&quot;,\&quot;example\&quot;,\&quot;tags\&quot;]}&quot;, }; In which case the complete broadcast operation would look like this: broadcast.comment(post, privatePostingKey) With privatePostingKey being the private posting key of the author broadcasting the comment or post Create_vs_Update: When a comment is first broadcast, the permlink must be unique for the author. Otherwise, it is interpreted as an update operation. Updating will either replace the entire body with the latest operation or patch the body if using diff-match-patch. For example, if we have a paragraph that has already been broadcast: “It’s been quite a lot of fun working with these wonderful folk at Steemit, Inc” And we want to change it to: “It’s been quite a lot of fun working with these wonderful people at Steemit, Inc” We can broadcast the comment operation with the following body: ”@@ -406,12 +406,14 @@” ful -folk +people at The blockchain will know that this means we have changed the word ‘folk’ to ‘people’ within that paragraph so when fetching this content, this diff will be applied. In addition to body, the title and json_metadata fields will also be replaced by the latest operation. Comment_Options: LINK Updating_Archived_Content: Content that is older than 7 days is considered “archived” and cannot be edited unless the author indicates otherwise by broadcasting a custom_json to the witness plugin using their active authority. As of HF18, the witness plugin has a custom operation called enable_content_editing that allows a user to signal they want to edit their content. By consensus, content is editable indefinitely, but is soft forked to be frozen after payout. This operation requires an active key and is designed to prevent vandalism if a posting key is compromised. For ‘custom_json’: LINK Vote: LINK It should also be noted that a vote operation can accompany a comment in the same transaction when the author self_upvotes" />
<link rel="canonical" href="https://developer.steem.io/apidefinitions/broadcast-ops-comment" />
<meta property="og:url" content="https://developer.steem.io/apidefinitions/broadcast-ops-comment" />
<meta property="og:site_name" content="Steem Developer" />
<meta property="og:type" content="article" />
<meta property="article:published_time" content="2018-07-20T12:56:08-05:00" />
<script type="application/ld+json">
{"@context": "http://schema.org",
"@type": "BlogPosting",
"headline": "Broadcast Ops Comment",
"datePublished": "2018-07-20T12:56:08-05:00",
"description": "This is a brief overview of the parameters allowed and values passed by the ‘comment’ operation Additional info for API definitions is available on the dev portal Purpose: A broadcast operation on Steem is a way of expressing intention on the blockchain. They have types, like comment in this instance, and they parameters (like author) depending on what their intended use is In other words, the broadcast.comment operation creates a post or a comment on a current post, on the steem blockchain. Rules: The “title” must not be longer than 256 bytes The “title” must be UTF-8 The “body” must be larger than 0 bytes The “body” much also be UTF-8 Parameters: parent_author - the author that comment is being submitted to, when posting a new blog this is an empty string parent_permlink - specific post that comment is being submitted to, when posting a new blog this is an empty string author - author of the post/comment being submitted (account name) permlink - unique string identifier for the post, linked to the author of the post title - human readable title of the post being submitted, this is often blank when commenting body - body of the post/comment being submitted, or diff-match-patch when updating json_metadata - JSON object string Additional Parameter Definitions: permlink: Two authors may have the same permlink as it’s unique to the author only. For example, there could be two authors, alice and bob, and both could have a permlink of firstpost json_metadata: There is no blockchain enforced validation on json_metadata, but the community has adopted a particular structure. It should contain a JSON object with the following keys: tags - An array of up to 5 strings. Although the blockchain will accept more than 5, the tags plugin only looks at the first five app - A user agent style application identifier. Typically app_name.version, e.g. steemit/0.1 format - The format of the body, e.g. markdown In addition to the above keys, application developrs are free to add any other keys they want to help manage the content they broadcast. A typical comment operation would look similar to the below: const post = { author :&quot;Joe&quot;, title :&quot;A post by Joe&quot;, body :&quot;Look at my awesome post&quot;, parent_author :&#39;&#39;, parent_permlink :&quot;steem&quot;, permlink :&quot;a-post-by-joe&quot;, json_metadata :&quot;{\\&quot;tags\\&quot;:[\\&quot;steemit\\&quot;,\\&quot;example\\&quot;,\\&quot;tags\\&quot;]}&quot;, }; In which case the complete broadcast operation would look like this: broadcast.comment(post, privatePostingKey) With privatePostingKey being the private posting key of the author broadcasting the comment or post Create_vs_Update: When a comment is first broadcast, the permlink must be unique for the author. Otherwise, it is interpreted as an update operation. Updating will either replace the entire body with the latest operation or patch the body if using diff-match-patch. For example, if we have a paragraph that has already been broadcast: “It’s been quite a lot of fun working with these wonderful folk at Steemit, Inc” And we want to change it to: “It’s been quite a lot of fun working with these wonderful people at Steemit, Inc” We can broadcast the comment operation with the following body: ”@@ -406,12 +406,14 @@” ful -folk +people at The blockchain will know that this means we have changed the word ‘folk’ to ‘people’ within that paragraph so when fetching this content, this diff will be applied. In addition to body, the title and json_metadata fields will also be replaced by the latest operation. Comment_Options: LINK Updating_Archived_Content: Content that is older than 7 days is considered “archived” and cannot be edited unless the author indicates otherwise by broadcasting a custom_json to the witness plugin using their active authority. As of HF18, the witness plugin has a custom operation called enable_content_editing that allows a user to signal they want to edit their content. By consensus, content is editable indefinitely, but is soft forked to be frozen after payout. This operation requires an active key and is designed to prevent vandalism if a posting key is compromised. For ‘custom_json’: LINK Vote: LINK It should also be noted that a vote operation can accompany a comment in the same transaction when the author self_upvotes",
"url": "https://developer.steem.io/apidefinitions/broadcast-ops-comment"}</script>
<!-- End Jekyll SEO tag -->


	
</head>
<body>
<header>
	<h1>
		<button type="button" class="open-nav" id="open-nav"></button>
		<a href="/"  class="logo-link"><img src="/images/logotype_white.svg" height="40" alt="Steem Developer logo"></a>
	</h1>

	
	<form action="/search/" method="get">
		<input type="text" name="q" id="search-input" placeholder="Search">
		<input type="submit" value="Search" style="display: none;">
	</form>
	

	<div id="sidebar" class="sidebar">
	
	
	
		
    <section class="pnl-main-nav-section main-nav-section" url="/">
		<h6 class="ctrl-nav-section title">Introduction</h6>
		<ul class="cont-nav-section content">
			
				
					
					
						
						<li><a href="/#introduction-welcome">Welcome to Steem</a></li>
						
					
				
			
		</ul>
	</section>
	
		
    <section class="pnl-main-nav-section main-nav-section" url="/quickstart/">
		<h6 class="ctrl-nav-section title">Quickstart</h6>
		<ul class="cont-nav-section content">
			
				
					
					
						
						<li><a href="/quickstart/#quickstart-choose-library">Choose Library</a></li>
						
					
						
						<li><a href="/quickstart/#quickstart-steemd-nodes">steemd Nodes</a></li>
						
					
						
						<li><a href="/quickstart/#quickstart-testnet">Steem Testnet</a></li>
						
					
				
			
		</ul>
	</section>
	
		
    <section class="pnl-main-nav-section main-nav-section" url="/tutorials/">
		<h6 class="ctrl-nav-section title">Tutorials</h6>
		<ul class="cont-nav-section content">
			
				
					
						<li><a href="/tutorials/#tutorials-javascript">Javascript</a></li>
					
				
					
						<li><a href="/tutorials/#tutorials-python">Python</a></li>
					
				
					
						<li><a href="/tutorials/#tutorials-ruby">Ruby</a></li>
					
				
					
						<li><a href="/tutorials/#tutorials-recipes">Recipes</a></li>
					
				
			
		</ul>
	</section>
	
		
    <section class="pnl-main-nav-section main-nav-section" url="/services/">
		<h6 class="ctrl-nav-section title">Services</h6>
		<ul class="cont-nav-section content">
			
				
					
					
						
						<li><a href="/services/#services-steemit">Steemit.com</a></li>
						
					
						
						<li><a href="/services/#services-steemconnect">SteemConnect</a></li>
						
					
						
						<li><a href="/services/#services-jussi">jussi</a></li>
						
					
						
						<li><a href="/services/#services-imagehoster">ImageHoster</a></li>
						
					
						
						<li><a href="/services/#services-sbds">SBDS</a></li>
						
					
				
			
		</ul>
	</section>
	
		
    <section class="pnl-main-nav-section main-nav-section" url="/apidefinitions/">
		<h6 class="ctrl-nav-section title">Appbase API</h6>
		<ul class="cont-nav-section content">
			
				
					
					
						
						<li><a href="/apidefinitions/#apidefinitions-condenser-api">Condenser Api</a></li>
						
					
						
						<li><a href="/apidefinitions/#apidefinitions-account-by-key-api">Account By Key Api</a></li>
						
					
						
						<li><a href="/apidefinitions/#apidefinitions-broadcast-ops-comment">Broadcast Ops Comment</a></li>
						
					
						
						<li><a href="/apidefinitions/#apidefinitions-account-history-api">Account History Api</a></li>
						
					
						
						<li><a href="/apidefinitions/#apidefinitions-database-api">Database Api</a></li>
						
					
						
						<li><a href="/apidefinitions/#apidefinitions-follow-api">Follow Api</a></li>
						
					
						
						<li><a href="/apidefinitions/#apidefinitions-jsonrpc">Jsonrpc</a></li>
						
					
						
						<li><a href="/apidefinitions/#apidefinitions-market-history-api">Market History Api</a></li>
						
					
						
						<li><a href="/apidefinitions/#apidefinitions-network-broadcast-api">Network Broadcast Api</a></li>
						
					
						
						<li><a href="/apidefinitions/#apidefinitions-tags-api">Tags Api</a></li>
						
					
						
						<li><a href="/apidefinitions/#apidefinitions-witness-api">Witness Api</a></li>
						
					
						
						<li><a href="/apidefinitions/#apidefinitions-block-api">Block Api</a></li>
						
					
						
						<li><a href="/apidefinitions/#apidefinitions-broadcast-ops">Broadcast Ops</a></li>
						
					
				
			
		</ul>
	</section>
	
		
    <section class="pnl-main-nav-section main-nav-section" url="/community/">
		<h6 class="ctrl-nav-section title">Community</h6>
		<ul class="cont-nav-section content">
			
				
					
					
						
						<li><a href="/community/#community-overview">Overview</a></li>
						
					
						
						<li><a href="/community/#community-resources">Resources</a></li>
						
					
						
						<li><a href="/community/#community-developeradvocate">Sharing & Help</a></li>
						
					
				
			
		</ul>
	</section>
	
		
    <section class="pnl-main-nav-section main-nav-section" url="/glossary/">
		<h6 class="ctrl-nav-section title">Glossary</h6>
		<ul class="cont-nav-section content">
			
				
					
					
						
						<li><a href="/glossary/#glossary-chain-basics">Chain Basics</a></li>
						
					
						
					
						
						<li><a href="/glossary/#glossary-governance">Governance</a></li>
						
					
						
						<li><a href="/glossary/#glossary-transactions">Transactions</a></li>
						
					
						
						<li><a href="/glossary/#glossary-api">API</a></li>
						
					
						
						<li><a href="/glossary/#glossary-market">Market</a></li>
						
					
				
			
		</ul>
	</section>
	
</div>


	<!--<p class="copyright">-->
	<!--<a href="https://steemit.com.com/">-->
	<!--steemit-->
	<!--</a>-->
	<!--</p>-->
	<link href="https://fonts.googleapis.com/css?family=Nunito" rel="stylesheet">
</header>
<div class="main" id="top">
	<div class="hero">
		<h1 class="hero__h1">Steem Developer Portal </h1>
		
		<img class="hero__img" src="/images/hero.png">
		
	</div>
	
<p>This is a brief overview of the parameters allowed and values passed by the ‘comment’ operation</p>

<p>Additional info for API definitions is available on the <a href="/apidefinitions/#broadcast_ops_comment">dev portal</a></p>

<p><strong>Purpose:</strong></p>

<p>A broadcast operation on Steem is a way of expressing intention on the blockchain.
They have types, like <code class="highlighter-rouge">comment</code> in this instance, and they parameters (like author) depending on what their intended use is
In other words, the <code class="highlighter-rouge">broadcast.comment</code> operation creates a post or a comment on a current post, on the steem blockchain.</p>

<p><strong>Rules:</strong></p>
<ul>
  <li>The “title” must not be longer than 256 bytes</li>
  <li>The “title” must be UTF-8</li>
  <li>The “body” must be larger than 0 bytes</li>
  <li>The “body” much also be UTF-8</li>
</ul>

<p><strong>Parameters:</strong></p>
<ul>
  <li>parent_author - the author that comment is being submitted to, when posting a new blog this is an empty string</li>
  <li>parent_permlink - specific post that comment is being submitted to, when posting a new blog this is an empty string</li>
  <li>author - author of the post/comment being submitted (account name)</li>
  <li>permlink - unique string identifier for the post, linked to the author of the post</li>
  <li>title - human readable title of the post being submitted, this is often blank when commenting</li>
  <li>body - body of the post/comment being submitted, or diff-match-patch when updating</li>
  <li>json_metadata - JSON object string</li>
</ul>

<p>Additional Parameter Definitions:</p>
<ul>
  <li>permlink:
  Two authors may have the same permlink as it’s unique to the author only. For example, there could be two authors, alice and bob, and both could have a permlink of <code class="highlighter-rouge">firstpost</code></li>
  <li>json_metadata:
There is no blockchain enforced validation on json_metadata, but the community has adopted a particular structure.</li>
  <li>It should contain a JSON object with the following keys:
    <ul>
      <li>tags - An array of up to 5 strings. Although the blockchain will accept more than 5, the tags plugin only looks at the first five</li>
      <li>app - A user agent style application identifier. Typically app_name.version, e.g. steemit/0.1</li>
      <li>format - The format of the body, e.g. markdown</li>
      <li>In addition to the above keys, application developrs are free to add any other keys they want to help manage the content they broadcast.</li>
    </ul>
  </li>
</ul>

<p>A typical <code class="highlighter-rouge">comment</code> operation would look similar to the below:</p>

<div class="language-javascript highlighter-rouge"><pre class="highlight"><code>  <span class="kr">const</span> <span class="nx">post</span> <span class="o">=</span> <span class="p">{</span>
    <span class="na">author</span> <span class="p">:</span><span class="s2">"Joe"</span><span class="p">,</span>
    <span class="na">title</span> <span class="p">:</span><span class="s2">"A post by Joe"</span><span class="p">,</span>
    <span class="na">body</span> <span class="p">:</span><span class="s2">"Look at my awesome post"</span><span class="p">,</span>
    <span class="na">parent_author</span> <span class="p">:</span><span class="s1">''</span><span class="p">,</span>
    <span class="na">parent_permlink</span> <span class="p">:</span><span class="s2">"steem"</span><span class="p">,</span>
    <span class="na">permlink</span> <span class="p">:</span><span class="s2">"a-post-by-joe"</span><span class="p">,</span>
    <span class="na">json_metadata</span> <span class="p">:</span><span class="s2">"{\"tags\":[\"steemit\",\"example\",\"tags\"]}"</span><span class="p">,</span>
  <span class="p">};</span>
</code></pre>
</div>
<p>In which case the complete <code class="highlighter-rouge">broadcast</code> operation would look like this:</p>

<div class="language-javascript highlighter-rouge"><pre class="highlight"><code>  <span class="nx">broadcast</span><span class="p">.</span><span class="nx">comment</span><span class="p">(</span><span class="nx">post</span><span class="p">,</span> <span class="nx">privatePostingKey</span><span class="p">)</span>
</code></pre>
</div>
<p>With privatePostingKey being the private posting key of the author broadcasting the comment or post</p>

<p><strong>Create_vs_Update:</strong></p>

<p>When a comment is first broadcast, the permlink must be unique for the author.
  Otherwise, it is interpreted as an update operation. Updating will either replace the entire body with the latest operation or patch the body if using diff-match-patch.</p>

<p>For example, if we have a paragraph that has already been broadcast:</p>

<p>“It’s been quite a lot of fun working with these wonderful folk at Steemit, Inc”</p>

<p>And we want to change it to:</p>

<p>“It’s been quite a lot of fun working with these wonderful people at Steemit, Inc”</p>

<p>We can broadcast the comment operation with the following body:</p>
<ul>
  <li>”@@ -406,12 +406,14 @@”</li>
  <li>ful</li>
  <li>-folk</li>
  <li>+people</li>
  <li>at</li>
</ul>

<p>The blockchain will know that this means we have changed the word ‘folk’ to ‘people’ within that paragraph so when fetching this content, this diff will be applied.</p>

<p>In addition to body, the title and json_metadata fields will also be replaced by the latest operation.</p>

<p><strong>Comment_Options:</strong> <a href="/apidefinitions/#broadcast_ops_comment_options">LINK</a></p>

<p><strong>Updating_Archived_Content:</strong></p>

<p>Content that is older than 7 days is considered “archived” and cannot be edited unless the author indicates otherwise by broadcasting a custom_json to the witness plugin using their active authority.</p>

<p>As of HF18, the witness plugin has a custom operation called enable_content_editing that allows a user to signal they want to edit their content. By consensus, content is editable indefinitely, but is soft forked to be frozen after payout. This operation requires an active key and is designed to prevent vandalism if a posting key is compromised.</p>

<p><strong>For ‘custom_json’:</strong> <a href="/apidefinitions/#broadcast_ops_custom_json">LINK</a></p>

<p><strong>Vote:</strong> <a href="/apidefinitions/#broadcast_ops_vote">LINK</a></p>

<p>It should also be noted that a <code class="highlighter-rouge">vote</code> operation can accompany a <code class="highlighter-rouge">comment</code> in the same transaction when the author <code class="highlighter-rouge">self_upvotes</code></p>


</div>
<div class="footer">
	<a href="#">Back to top</a>
</div>
<script>
    document.getElementById("open-nav").addEventListener("click", function () {
        document.body.classList.toggle("nav-open");
    });
</script>
</body>
</html>


<script src="/js/adjust.js"></script>

